package com.gdms.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gdms.dao.IMajorDao;
import com.gdms.entity.Major;
import com.gdms.service.IMajorService;

@Service
public class MajorServiceImpl implements IMajorService {
	@Autowired
	private IMajorDao majorDao;
	
	public List<Major> showAllMajor() {
		return majorDao.getAllMajor();
	}

	public String getNameById(int id) {
		// TODO Auto-generated method stub
		return majorDao.getNameById(id);
	}

	public int getIdByName(String name) {
		// TODO Auto-generated method stub
		return majorDao.getIdByName(name);
	}
}
